.class public abstract Lcom/zuimeia/ui/viewfragment/ViewFragmentPagerAdapter;
.super Landroid/support/v4/view/PagerAdapter;
.source "ViewFragmentPagerAdapter.java"


# instance fields
.field private mContext:Landroid/content/Context;

.field private mFragments:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/zuimeia/ui/viewfragment/ViewFragment;",
            ">;"
        }
    .end annotation
.end field

.field private mInflater:Landroid/view/LayoutInflater;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 3
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    .line 18
    invoke-direct {p0}, Landroid/support/v4/view/PagerAdapter;-><init>()V

    .line 13
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/zuimeia/ui/viewfragment/ViewFragmentPagerAdapter;->mFragments:Ljava/util/ArrayList;

    .line 19
    iput-object p1, p0, Lcom/zuimeia/ui/viewfragment/ViewFragmentPagerAdapter;->mContext:Landroid/content/Context;

    .line 20
    invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Lcom/zuimeia/ui/viewfragment/ViewFragmentPagerAdapter;->mInflater:Landroid/view/LayoutInflater;

    .line 21
    return-void
.end method


# virtual methods
.method public destroyItem(Landroid/view/ViewGroup;ILjava/lang/Object;)V
    .registers 7
    .param p1, "container"    # Landroid/view/ViewGroup;
    .param p2, "position"    # I
    .param p3, "object"    # Ljava/lang/Object;

    .prologue
    .line 53
    move-object v0, p3

    check-cast v0, Lcom/zuimeia/ui/viewfragment/ViewFragment;

    .line 54
    .local v0, "fragment":Lcom/zuimeia/ui/viewfragment/ViewFragment;
    iget-object v1, p0, Lcom/zuimeia/ui/viewfragment/ViewFragmentPagerAdapter;->mFragments:Ljava/util/ArrayList;

    const/4 v2, 0x0

    invoke-virtual {v1, p2, v2}, Ljava/util/ArrayList;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 56
    :try_start_9
    invoke-virtual {v0}, Lcom/zuimeia/ui/viewfragment/ViewFragment;->getView()Landroid/view/View;

    move-result-object v1

    invoke-virtual {p1, v1}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V

    .line 57
    invoke-virtual {v0}, Lcom/zuimeia/ui/viewfragment/ViewFragment;->onDestroy()V
    :try_end_13
    .catch Ljava/lang/Throwable; {:try_start_9 .. :try_end_13} :catch_14

    .line 61
    :goto_13
    return-void

    .line 58
    :catch_14
    move-exception v1

    goto :goto_13
.end method

.method public getFragments()Ljava/util/ArrayList;
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/zuimeia/ui/viewfragment/ViewFragment;",
            ">;"
        }
    .end annotation

    .prologue
    .line 26
    iget-object v0, p0, Lcom/zuimeia/ui/viewfragment/ViewFragmentPagerAdapter;->mFragments:Ljava/util/ArrayList;

    return-object v0
.end method

.method public abstract getItem(I)Lcom/zuimeia/ui/viewfragment/ViewFragment;
.end method

.method public instantiateItem(Landroid/view/ViewGroup;I)Ljava/lang/Object;
    .registers 7
    .param p1, "container"    # Landroid/view/ViewGroup;
    .param p2, "position"    # I

    .prologue
    .line 31
    iget-object v2, p0, Lcom/zuimeia/ui/viewfragment/ViewFragmentPagerAdapter;->mFragments:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-le v2, p2, :cond_13

    .line 32
    iget-object v2, p0, Lcom/zuimeia/ui/viewfragment/ViewFragmentPagerAdapter;->mFragments:Ljava/util/ArrayList;

    invoke-virtual {v2, p2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/zuimeia/ui/viewfragment/ViewFragment;

    .line 33
    .local v0, "f":Lcom/zuimeia/ui/viewfragment/ViewFragment;
    if-eqz v0, :cond_13

    .line 48
    .end local v0    # "f":Lcom/zuimeia/ui/viewfragment/ViewFragment;
    :goto_12
    return-object v0

    .line 38
    :cond_13
    invoke-virtual {p0, p2}, Lcom/zuimeia/ui/viewfragment/ViewFragmentPagerAdapter;->getItem(I)Lcom/zuimeia/ui/viewfragment/ViewFragment;

    move-result-object v1

    .line 39
    .local v1, "fragment":Lcom/zuimeia/ui/viewfragment/ViewFragment;
    :goto_17
    iget-object v2, p0, Lcom/zuimeia/ui/viewfragment/ViewFragmentPagerAdapter;->mFragments:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-gt v2, p2, :cond_26

    .line 40
    iget-object v2, p0, Lcom/zuimeia/ui/viewfragment/ViewFragmentPagerAdapter;->mFragments:Ljava/util/ArrayList;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_17

    .line 43
    :cond_26
    iget-object v2, p0, Lcom/zuimeia/ui/viewfragment/ViewFragmentPagerAdapter;->mFragments:Ljava/util/ArrayList;

    invoke-virtual {v2, p2, v1}, Ljava/util/ArrayList;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 45
    iget-object v2, p0, Lcom/zuimeia/ui/viewfragment/ViewFragmentPagerAdapter;->mInflater:Landroid/view/LayoutInflater;

    invoke-virtual {v1, v2, p1}, Lcom/zuimeia/ui/viewfragment/ViewFragment;->performInit(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;)V

    .line 46
    invoke-virtual {v1}, Lcom/zuimeia/ui/viewfragment/ViewFragment;->getView()Landroid/view/View;

    move-result-object v2

    invoke-virtual {p1, v2}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V

    move-object v0, v1

    .line 48
    goto :goto_12
.end method

.method public isViewFromObject(Landroid/view/View;Ljava/lang/Object;)Z
    .registers 4
    .param p1, "view"    # Landroid/view/View;
    .param p2, "object"    # Ljava/lang/Object;

    .prologue
    .line 65
    check-cast p2, Lcom/zuimeia/ui/viewfragment/ViewFragment;

    .end local p2    # "object":Ljava/lang/Object;
    invoke-virtual {p2}, Lcom/zuimeia/ui/viewfragment/ViewFragment;->getView()Landroid/view/View;

    move-result-object v0

    if-ne v0, p1, :cond_a

    const/4 v0, 0x1

    :goto_9
    return v0

    :cond_a
    const/4 v0, 0x0

    goto :goto_9
.end method
